﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace ETC.DLEDLightingSystemPlus.Models
{
    public class DIYLedModel:Bandit.UI.MVVM.NotifyObject
    {
        public string Name { get; set; }

        public Point Position { get; set; }

        public string Scan_num { get; set; }
        public string ICID { get; set; }

        public int LEDID { get; set; }

        private int _LightValue;
        public int LightValue
        {
            get { return _LightValue; }
            set
            {
                _LightValue= value;

                //if(_LightValue == 1000)
                //{
                //    IsLightStatus= true;
                //}
                //else
                //{
                //    IsLightStatus= false;
                //}

                ToolTip = "ScanNum:" + Scan_num + "\nICID:" + ICID + "\nLEDID:" + LEDID + "\nLightValue:" + value;


                OnPropertyChanged(nameof(LightValue));
            }
        }

        private double _ReaLightCurrentValue;
        public double ReaLightCurrentValue
        {
            get { return _ReaLightCurrentValue;}
            set
            {
                _ReaLightCurrentValue= value;
                OnPropertyChanged(nameof(ReaLightCurrentValue));
            }
        }

        private string _ToolTip;
        public string ToolTip { get { return _ToolTip; } set { _ToolTip = value; OnPropertyChanged(nameof(ToolTip)); } }

        public Visibility IsFlag { get; set; }

        private string _LedType;

        public string LedType
        {
            get { return _LedType; }
            set
            {
                _LedType = value;
                Remark = "ScanNum:" + Scan_num + "ICID:" + ICID + ",LEDID:" + LEDID + " State:" + _LedType;
                OnPropertyChanged(nameof(LedType));
            }
        }

        private string _Remark;
        public string Remark
        {
            get { return _Remark; }
            set
            {
                _Remark = value;
                OnPropertyChanged(nameof(Remark));
            }
        }
    }
}
